package com.chinaunicom.behavior.responsibilitychain;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/6/8 15:43
 * Description: 自定义拦截器: CustomHandlerInterceptor
 */
public class CustomHandlerInterceptor implements HandlerInterceptor{

    @Override
    public boolean handler(Object handler){
        if (handler instanceof String) {
            handler = (String) handler;
            if (((String) handler).contains("admin")){
                System.out.println("custom handler interceptor ");
                return true;
            }
        }
        return false;
    }
}
